.class Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget$MissedNotiBitmapRunnable;
.super Ljava/lang/Object;
.source "MissedNotiWidget.java"

# interfaces
.implements Ljava/lang/Runnable;


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x2
    name = "MissedNotiBitmapRunnable"
.end annotation


# instance fields
.field private mArea:Landroid/graphics/Rect;

.field private mBitmap:Landroid/graphics/Bitmap;

.field final synthetic this$0:Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;


# direct methods
.method private constructor <init>(Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;)V
    .locals 0
    .parameter

    .prologue
    .line 213
    iput-object p1, p0, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget$MissedNotiBitmapRunnable;->this$0:Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method synthetic constructor <init>(Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget$1;)V
    .locals 0
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 213
    invoke-direct {p0, p1}, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget$MissedNotiBitmapRunnable;-><init>(Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;)V

    return-void
.end method


# virtual methods
.method public run()V
    .locals 15

    .prologue
    .line 223
    new-instance v0, Landroid/graphics/Canvas;

    iget-object v11, p0, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget$MissedNotiBitmapRunnable;->mBitmap:Landroid/graphics/Bitmap;

    invoke-direct {v0, v11}, Landroid/graphics/Canvas;-><init>(Landroid/graphics/Bitmap;)V

    .line 226
    .local v0, canvas:Landroid/graphics/Canvas;
    new-instance v5, Landroid/graphics/Rect;

    iget-object v11, p0, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget$MissedNotiBitmapRunnable;->mArea:Landroid/graphics/Rect;

    iget v11, v11, Landroid/graphics/Rect;->left:I

    add-int/lit8 v11, v11, 0xa

    iget-object v12, p0, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget$MissedNotiBitmapRunnable;->mArea:Landroid/graphics/Rect;

    iget v12, v12, Landroid/graphics/Rect;->top:I

    iget-object v13, p0, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget$MissedNotiBitmapRunnable;->mArea:Landroid/graphics/Rect;

    invoke-virtual {v13}, Landroid/graphics/Rect;->centerX()I

    move-result v13

    iget-object v14, p0, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget$MissedNotiBitmapRunnable;->mArea:Landroid/graphics/Rect;

    iget v14, v14, Landroid/graphics/Rect;->bottom:I

    invoke-direct {v5, v11, v12, v13, v14}, Landroid/graphics/Rect;-><init>(IIII)V

    .line 227
    .local v5, missedCallRect:Landroid/graphics/Rect;
    new-instance v3, Lcom/nemustech/regina/ElementReginaWidget$Gadget;

    iget-object v11, p0, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget$MissedNotiBitmapRunnable;->this$0:Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;

    const/4 v12, 0x0

    invoke-direct {v3, v11, v5, v12}, Lcom/nemustech/regina/ElementReginaWidget$Gadget;-><init>(Lcom/nemustech/regina/ElementReginaWidget;Landroid/graphics/Rect;Landroid/graphics/Rect;)V

    .line 228
    .local v3, missedCallGadget:Lcom/nemustech/regina/ElementReginaWidget$Gadget;
    new-instance v11, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget$MissedNotiBitmapRunnable$1;

    invoke-direct {v11, p0}, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget$MissedNotiBitmapRunnable$1;-><init>(Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget$MissedNotiBitmapRunnable;)V

    invoke-virtual {v3, v11}, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->setActor(Ljava/lang/Runnable;)V

    .line 236
    const/4 v11, 0x1

    invoke-virtual {v3, v11}, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->setGadgetType(I)V

    .line 237
    iget-object v11, p0, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget$MissedNotiBitmapRunnable;->this$0:Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;

    const/4 v12, 0x0

    invoke-virtual {v11, v12, v3}, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;->addGadget(ILcom/nemustech/regina/ElementReginaWidget$Gadget;)V

    .line 240
    iget-object v11, p0, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget$MissedNotiBitmapRunnable;->this$0:Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;

    invoke-static {v11}, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;->access$300(Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;)Lcom/nemustech/regina/widgets/missednoti/CallLogReader;

    move-result-object v11

    invoke-virtual {v11}, Lcom/nemustech/regina/widgets/missednoti/CallLogReader;->getMissedCallLogCount()I

    move-result v2

    .line 241
    .local v2, missedCallCount:I
    iget-object v11, p0, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget$MissedNotiBitmapRunnable;->this$0:Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;

    invoke-static {v11}, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;->access$400(Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;)Landroid/content/res/Resources;

    move-result-object v11

    const v12, 0x7f020052

    invoke-static {v11, v12}, Lcom/nemustech/regina/RUtils;->decodeResource(Landroid/content/res/Resources;I)Landroid/graphics/Bitmap;

    move-result-object v4

    .line 242
    .local v4, missedCallIcon:Landroid/graphics/Bitmap;
    iget-object v11, p0, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget$MissedNotiBitmapRunnable;->this$0:Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;

    invoke-static {v2}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v12

    invoke-static {v11, v4, v12}, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;->access$500(Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;Landroid/graphics/Bitmap;Ljava/lang/String;)Landroid/graphics/Bitmap;

    move-result-object v1

    .line 243
    .local v1, missedCall:Landroid/graphics/Bitmap;
    invoke-virtual {v0}, Landroid/graphics/Canvas;->getWidth()I

    move-result v11

    div-int/lit8 v11, v11, 0x2

    invoke-virtual {v0}, Landroid/graphics/Canvas;->getWidth()I

    move-result v12

    div-int/lit8 v12, v12, 0x4

    sub-int/2addr v11, v12

    invoke-virtual {v1}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v12

    div-int/lit8 v12, v12, 0x2

    sub-int/2addr v11, v12

    int-to-float v11, v11

    invoke-virtual {v0}, Landroid/graphics/Canvas;->getHeight()I

    move-result v12

    int-to-float v12, v12

    const/high16 v13, 0x4000

    div-float/2addr v12, v13

    invoke-virtual {v1}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v13

    int-to-float v13, v13

    const/high16 v14, 0x4000

    div-float/2addr v13, v14

    sub-float/2addr v12, v13

    new-instance v13, Landroid/graphics/Paint;

    invoke-direct {v13}, Landroid/graphics/Paint;-><init>()V

    invoke-virtual {v0, v1, v11, v12, v13}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;FFLandroid/graphics/Paint;)V

    .line 247
    invoke-virtual {v4}, Landroid/graphics/Bitmap;->recycle()V

    .line 248
    const/4 v4, 0x0

    .line 249
    invoke-virtual {v1}, Landroid/graphics/Bitmap;->recycle()V

    .line 250
    const/4 v1, 0x0

    .line 253
    new-instance v10, Landroid/graphics/Rect;

    iget-object v11, p0, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget$MissedNotiBitmapRunnable;->mArea:Landroid/graphics/Rect;

    invoke-virtual {v11}, Landroid/graphics/Rect;->centerX()I

    move-result v11

    iget-object v12, p0, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget$MissedNotiBitmapRunnable;->mArea:Landroid/graphics/Rect;

    iget v12, v12, Landroid/graphics/Rect;->top:I

    iget-object v13, p0, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget$MissedNotiBitmapRunnable;->mArea:Landroid/graphics/Rect;

    iget v13, v13, Landroid/graphics/Rect;->right:I

    const/16 v14, 0xa

    sub-int/2addr v13, v14

    iget-object v14, p0, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget$MissedNotiBitmapRunnable;->mArea:Landroid/graphics/Rect;

    iget v14, v14, Landroid/graphics/Rect;->bottom:I

    invoke-direct {v10, v11, v12, v13, v14}, Landroid/graphics/Rect;-><init>(IIII)V

    .line 255
    .local v10, missedSMSRect:Landroid/graphics/Rect;
    new-instance v8, Lcom/nemustech/regina/ElementReginaWidget$Gadget;

    iget-object v11, p0, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget$MissedNotiBitmapRunnable;->this$0:Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;

    const/4 v12, 0x0

    invoke-direct {v8, v11, v10, v12}, Lcom/nemustech/regina/ElementReginaWidget$Gadget;-><init>(Lcom/nemustech/regina/ElementReginaWidget;Landroid/graphics/Rect;Landroid/graphics/Rect;)V

    .line 256
    .local v8, missedSMSGadget:Lcom/nemustech/regina/ElementReginaWidget$Gadget;
    new-instance v11, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget$MissedNotiBitmapRunnable$2;

    invoke-direct {v11, p0}, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget$MissedNotiBitmapRunnable$2;-><init>(Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget$MissedNotiBitmapRunnable;)V

    invoke-virtual {v8, v11}, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->setActor(Ljava/lang/Runnable;)V

    .line 271
    const/4 v11, 0x1

    invoke-virtual {v8, v11}, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->setGadgetType(I)V

    .line 272
    iget-object v11, p0, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget$MissedNotiBitmapRunnable;->this$0:Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;

    const/4 v12, 0x0

    invoke-virtual {v11, v12, v8}, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;->addGadget(ILcom/nemustech/regina/ElementReginaWidget$Gadget;)V

    .line 275
    iget-object v11, p0, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget$MissedNotiBitmapRunnable;->this$0:Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;

    invoke-static {v11}, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;->access$700(Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;)Lcom/nemustech/regina/widgets/missednoti/SMSInfoReader;

    move-result-object v11

    invoke-virtual {v11}, Lcom/nemustech/regina/widgets/missednoti/SMSInfoReader;->getMissedSMSInfoCount()I

    move-result v7

    .line 276
    .local v7, missedSMSCount:I
    iget-object v11, p0, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget$MissedNotiBitmapRunnable;->this$0:Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;

    invoke-static {v11}, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;->access$700(Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;)Lcom/nemustech/regina/widgets/missednoti/SMSInfoReader;

    move-result-object v11

    invoke-virtual {v11}, Lcom/nemustech/regina/widgets/missednoti/SMSInfoReader;->getMissedMMSInfoCount()I

    move-result v11

    add-int/2addr v7, v11

    .line 278
    iget-object v11, p0, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget$MissedNotiBitmapRunnable;->this$0:Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;

    invoke-static {v11}, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;->access$800(Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;)Landroid/content/res/Resources;

    move-result-object v11

    const v12, 0x7f020054

    invoke-static {v11, v12}, Lcom/nemustech/regina/RUtils;->decodeResource(Landroid/content/res/Resources;I)Landroid/graphics/Bitmap;

    move-result-object v9

    .line 279
    .local v9, missedSMSIcon:Landroid/graphics/Bitmap;
    iget-object v11, p0, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget$MissedNotiBitmapRunnable;->this$0:Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;

    invoke-static {v7}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v12

    invoke-static {v11, v9, v12}, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;->access$500(Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;Landroid/graphics/Bitmap;Ljava/lang/String;)Landroid/graphics/Bitmap;

    move-result-object v6

    .line 280
    .local v6, missedSMS:Landroid/graphics/Bitmap;
    invoke-virtual {v0}, Landroid/graphics/Canvas;->getWidth()I

    move-result v11

    div-int/lit8 v11, v11, 0x2

    invoke-virtual {v0}, Landroid/graphics/Canvas;->getWidth()I

    move-result v12

    div-int/lit8 v12, v12, 0x4

    add-int/2addr v11, v12

    invoke-virtual {v6}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v12

    div-int/lit8 v12, v12, 0x2

    sub-int/2addr v11, v12

    int-to-float v11, v11

    invoke-virtual {v0}, Landroid/graphics/Canvas;->getHeight()I

    move-result v12

    div-int/lit8 v12, v12, 0x2

    invoke-virtual {v6}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v13

    div-int/lit8 v13, v13, 0x2

    sub-int/2addr v12, v13

    int-to-float v12, v12

    new-instance v13, Landroid/graphics/Paint;

    invoke-direct {v13}, Landroid/graphics/Paint;-><init>()V

    invoke-virtual {v0, v6, v11, v12, v13}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;FFLandroid/graphics/Paint;)V

    .line 282
    return-void
.end method

.method public setMissedNotiRes(Landroid/graphics/Bitmap;Landroid/graphics/Rect;)V
    .locals 0
    .parameter "bitmap"
    .parameter "area"

    .prologue
    .line 218
    iput-object p1, p0, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget$MissedNotiBitmapRunnable;->mBitmap:Landroid/graphics/Bitmap;

    .line 219
    iput-object p2, p0, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget$MissedNotiBitmapRunnable;->mArea:Landroid/graphics/Rect;

    .line 220
    return-void
.end method
